package com.zm.dao;

import com.zm.domain.Account;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface IAccountDao {
    //查询所有账户
    @Select("select * from account")
    @Results( id = "AccountMap",value = {
            @Result( id = true,property = "userId",column ="id"),
            @Result( property = "userUid",column ="uid"),
            @Result( property = "userMoney",column ="money")
    })
    public List<Account> findAllAccount();

    //保存单个用户
    @Insert("insert into account (id,uid,money) values(#{userId},#{userUid},#{userMoney})")
    public void saveAccount(Account account);
}
